import 'package:flutter/material.dart';

import '../config/router_handler.dart';
import '../public.dart';

class Routes {
  static String home = "/home";
  static String mine = "/mine";
  static String searchBook = "/search_book";
  static String reader = "/reader";
  static String chapter = "/chapter";
  static String bookInfo = "/book_info";
  static String moments = "/moments";
  static String retrieval = "/retrieval";

  static void configureRoutes(Router router) {
    router.notFoundHandler = new Handler(
        handlerFunc: (BuildContext context, Map<String, dynamic> params) {
      print("ROUTE PAGE WAS NOT FOUND !!!");
      return Container(
        child: Center(
          child: Text('404 Not Found!'),
        ),
      );
    });
    router.define(home, handler: homeHandler);
    router.define(mine, handler: mineHandler);
    router.define(searchBook, handler: searchBookHandler);
    router.define(chapter, handler: chapterHandler);
    router.define(reader, handler: readerHandler);
    router.define(bookInfo, handler: bookInfoHandler);
    router.define(moments, handler: momentsHandler);
    router.define(retrieval, handler: retrievalHandler);
  }
}
